﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

/// <summary>
/// Summary description for IO_Raspored
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService]
public class IO_Raspored_web : System.Web.Services.WebService {

    public IO_Raspored_web () {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod(Description="Метод за пресметка на просек со дадени оцени од положени предмети.")]
    public float Prosek(List<int> oceni)
    {
        int brojac = 0;
        float suma = 0;
        for (int k = 0; k < oceni.Count; k++)
        {
            brojac++;
            suma = suma + oceni[k];
        }
        suma = suma / (float)brojac;
        return suma;
    }
    [WebMethod(Description = "Proba")]
    public string Hello()
    {
        return "Well Hello There asshole!Glupa avtentikacija";
    }
    
}
